#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
const int MAXN=10050;
int a[MAXN];
int n,q,t;
int main(void){
    int c=1;
    while(~scanf("%d%d",&n,&q)){
        if(n==0 && q==0){
            break;
        }
        memset(a,0,sizeof(n));
        for(int i=0;i<n;i++){
            scanf("%d",&a[i]);
        }
        sort(a,a+n);
        for(int i=0;i<q;i++){
            scanf("%d",&t);
            if(i==0){
                printf("CASE# %d:\n",c++);
            }
            int f=lower_bound(a,a+n,t)-a;
            if(f>=0 && f<n && a[f]==t){
                printf("%d found at %d\n",t,f+1);
            }
            else{
                printf("%d not found\n",t);
            }
        }
    }
    return 0;
}
